package controller

import (
	"context"
	"lot_admin_api/api"
	"lot_admin_api/internal/model"
	"lot_admin_api/internal/service"
)

var Order = cOrder{}

type cOrder struct{}

// OrderList 获取充电订单列表
func (h *cOrder) OrderList(ctx context.Context, req *api.OrderListReq) (res *model.OrderListRes, err error) {
	res, _ = service.Order().OrderList(ctx, req.OrderSearchList)
	return res, err
}

// OrderInfo 获取充电订单详情
func (h *cOrder) OrderInfo(ctx context.Context, req *api.OrderInfoReq) (res *model.OrderDetailsDbRes, err error) {
	res, _ = service.Order().OrderInfo(ctx, req.OrderIdRes)
	return res, err
}
